Contents Overview See RefMan1-4 for Chapters 1 through 4 Introduction 1 Chapter 1. Prograph: The Language 3 Overview 3 Classes 4 Methods 8 Operations 9 Multiplex Operations 18 Controls 19 Persistents 23 Chapter 2. The Editor Environment 25 General Rules in the Editor 25 Menu Descriptions 31 Window Descriptions 72 Chapter 3. The Interpreter Environment 105 Modes of Execution 105 Windows 106 Menus 114 Runtime Interruption 120 Apple Events 123 Chapter 4. Application Builder 125 General Features 125 Applicable Prograph Menus 127 Application Editor 129 Menu Editor 132 Window Editors 136 Window Item Editors 139 Balloon Help 153 Access to Events 158 Mouse Techniques 163 See RefMan 5-7 for Chapters 5 through 7 Chapter 5. System Classes 167 An Overview 167 Application Manager 169 System Class Methods 170 System Class Specifications 176 Chapter 6. Prograph Primitives 245 Prograph Primitives by Category 245 Prograph Primitives Descriptions 248 Chapter 7. The Macintosh Toolbox 363 Working with the Toolbox 363 Calling Conventions 370 Essential Mac Methods 381 This document's Contents include the following Chapters and Appendixes plus a complete index for the original printed Reference Manual. Chapter 8. Pictopedia 425 Classes Window 426 Attributes Window 428 Methods Windows 429 Persistents Window 431 Case Window 432 Stack Window 435 Execution Case Window 436 Operation Icons 436 Chapter 9. The Prograph Compiler 447 (This information will be provided to you upon purchase of the Compiler from Pictorius Incorporated. For more information, see Chapter 9, or the "Classic Release Notes" document) File and Project Information 447 Menu Descriptions 450 Special Considerations 461 Load and Save 463 External C Code 468 Chapter 10. The Datafile Manager 471 Overview 471 Using the Datafile Manager 475 Recommended Practices 487 MultiUser Access to Datafile Manager 489 Error Handling 492 Datafile Manager Primitives Descriptions 494 Appendix I. Prograph Data Types 517 List of Data Types 517 Descriptions 517 Appendix II. C Code Usage 521 General Remarks 521 Writing XPrims 557 Writing XCode 574 Appendix III. Compiler Internals 587 (This information will be provided to you upon purchase of the Compiler from Pictorius Incorporated. For more information, see Chapter 9, or the "Classic Release Notes" document) Disassembly Files 588 Link Maps 590 Resources Generated by the Linker 591 Appendix IV. Syntax and Semantics 593 Definitions and Notation 594 Syntax 595 Semantics 608 Index 627 Detailed Table of Contents Chapter 8. Pictopedia 425 Classes Windows 426 Attributes Window 428 System Attributes 428 User-defined Attributes 429 Methods Window 429 Persistents Window 431 Case Window 432 Banner 432 Logo 433 Class / Name 433 Case List Button 433 Case List Pane 434 Stack Window 435 Execution Case Window 436 Operation Icons 436 Call to a Primitive 436 Call to a Universal Method 437 Call to the Macintosh Toolbox or to an External 437 Call to a Method in a Class 437 Opers 438 Simple 438 Constant 438 Match 439 Persistent 439 Instance 439 Get 439 Set 439 Local 440 Evaluate 440 Mac Constant 440 Mac Match 440 Mac Global 440 Mac Address 441 Mac Get Field 441 Mac Set Field 441 Controls 441 Simple 441 Super 442 Repeat 442 Next Case 442 Continue 442 Terminate 442 Finish 442 Fail 443 Annotations on a Terminal 443 Simple 443 Inject 443 List 443 Loop 443 Partition 444 Annotations on a Root 444 Simple 444 List 444 Loop 444 Synchro Link 445 Chapter 9. The Prograph Compiler 447 (This information will be provided to you upon purchase of the Compiler from Pictorius Incorporated. For more information, see Chapter 9, or the "Classic Release Notes" document) File and Project Information 447 The Locator Bar 448 The Project File Area 449 Menu Descriptions 450 The File Menu 450 New 450 Open… 450 Close 451 Save 451 Save As… 451 Revert to Saved 451 Page Setup… 451 Print… 451 Launch… 452 Quit 452 The Edit Menu 452 Undo 452 Cut, Copy, Paste, Clear 452 Select All 453 Options… 453 Show Clipboard 454 The Project Menu 454 Update 454 Update All 454 Disassemble… 454 File Info… 455 Project Info… 455 Build Library… 459 Build Application… 459 Run 460 Special Considerations 461 Naming Conventions 461 Inline Code 461 Efficiency Considerations 462 Unsupported Features 462 System 7 and 32-bit Clean 462 Load and Save 463 An Example of Load and Save 464 Load and Save Details 466 External C Code 468 Externals 468 XPrims 468 XCode 469 Chapter 10. The Datafile Manager 471 Overview 471 Components 472 Datafiles 472 Tables 473 Clusters 473 Keys 474 Using the Datafile Manager 475 High Level Overview 476 Loading Datafile Primitives 476 Creating A New Datafile 477 How to Create a Datafile 477 How to Create a Table 478 How to Create a Key for the Table 478 Sample Method for Creating a Datafile 479 Opening Datafiles, Tables & Keys 479 Opening A Datafile 479 How to Open a Datafile 480 How to Open a Table 481 How to Open a Key 481 Sample Method for Opening a Datafile 482 Finding/Navigating Clusters 482 How to Find a Cluster 483 Reading Clusters 484 How to Read a Cluster 484 Writing Clusters 485 Adding a New Cluster to a Table 485 Overwriting an Existing Cluster 486 Closing Datafiles 486 How to Close a Datafile 487 Recommended Practices 487 Flushing Datafiles 487 Compacting Datafiles 488 MultiUser Access to Database Engine 489 Locking and Unlocking Clusters 490 Error Handling 492 Catching Errors 494 Datafile Manager Primitives Descriptions 494 Appendix 1. Prograph Data Types 517 List of Data Types 517 Descriptions 517 Appendix II. C Code Usage 521 General Remarks 521 Naming Conventions 522 Prograph Data Types 522 Macintosh Data Types 525 Data Types in XPrims 525 Data Types in XCode 530 Use Counts 533 Arity Macros 535 Arguments 536 Supplied Functions 536 Writing XPrims 557 Function Return Values 559 XPrims in Interpreted Code 560 Building Interpreted XPrims Using THINK C 561 Creating the 'STR#' Resources Using THINK C 561 The Main Routine in THINK C 563 Building Interpreted XPrims Using MPW C 564 Creating the 'STR#' Resources with MPW 564 The Main Routine in MPW C 566 XPrims in Compiled Code 567 Building Compiled XPrims Using THINK C 567 Building Compiled XPrims Using MPW C 567 Example XPrims 568 Example # 1 568 Example # 2 570 Example # 3 571 Example # 4 573 Writing XCode 574 Function Return Values 575 Prograph Language Elements 575 Persistents 575 Universal Methods and Primitives 576 Class Identifiers 576 Default Instances 577 Class Attributes 577 Instance Attributes 578 Class Methods and Selectors 578 Simple Class Methods 579 Initialization Class Methods 580 Get Methods 581 Set Methods 582 Default Get and Set Methods 583 Object C Extensions 583 Building XCode in THINK C 586 Building XCode in MPW C 586 Appendix III. Compiler Internals 587 (This information will be provided to you upon purchase of the Compiler from Pictorius Incorporated. For more information, see Chapter 9, or the "Classic Release Notes" document) Disassembly Files 588 Link Maps 590 Resources Generated by the Linker 591 Appendix IV. Syntax and Semantics 593 Definitions and Notation 594 Syntax 595 Values 595 Program 597 External 598 Persistent 598 Class 598 Attribute 599 Method 599 Case 599 Operation 601 General 601 Simple 603 Get 603 Set 603 Instance Generator 604 Persistent 604 Local 604 Evaluation 605 Input 606 Output 607 Constant 607 Match 607 Mac Constant, Mac Match, Mac Global 608 Mac Get Field, Mac Set Field 608 Mac Address 608 Semantics 608 External 609 Method 609 Case 610 Execution Sequence 610 Execution Function for a Case 612 Operations in General 612 Controls 612 Method Selection 614 Runtime Name Determination 614 Operations in Plain mode 614 Simple Operations 614 Get 616 Set 617 Instance Generator 618 Persistent Operation 619 Local Operation 620 Evaluation 620 Output 620 Constant 620 Match 621 Mac Constant 621 Mac Match 621 Mac Global 621 Mac Get Field 621 Mac Set Field 622 Mac Get Address 622 Operations in Repeat Mode without True or False Roots 622 Input and Output Sequences 622 Execution Function for Repeat 624 Partition Operations 625 Index 627